include ../Makefile.param 

CFLAGS := -Wall
CPP:=$(CROSS)g++ 
CC:=$(CROSS)gcc


CORE_SRCS    :=  main.c api_lib.c
CORE_OBJS    :=  $(CORE_SRCS:%.c=%.o)

CPPSRCS    :=  $(wildcard *.cpp)
CPPOBJS    :=  $(CPPSRCS:%.cpp=%.o)

.PHONY : clean all

all:
	$(CC) $(CFLAGS) -c   $(CORE_SRCS)
#	$(CPP) $(CFLAGS) -fPIC -c   $(CPPSRCS)

#	$(CC) -s -o ./mdk -g $(CORE_OBJS) $(CPPOBJS) -ldl -lrt -lpthread
#	$(CC) -s -L../dvrr_svc -L./mmst -L../dvrr_svc/so -o ./mdk_core -g -lmdk_app -lmdk_mmst -lmdk_dvrr -ldl -lrt -lpthread
#	$(CC) -s -L./out -L../dmalloc-5.5.2 -L./tts/Lib -L../dvrr_svc -L./mmst -L../dvrr_svc/so -o ./mdk_core -g $(CORE_OBJS) $(CPPOBJS) $(DMLIB) $(LIB_PATH)/loadbmp.o -lAiSound5 -lmdk_app -lmdk_mmst -lmdk_dvrr -lmpi -l_aacdec -l_aacenc -l_amr_spc -l_amr_fipop -ltde -l_VoiceEngine -l_amr_fipop -l_aec -ldl -lrt -lpthread
	$(CC) -s -L./out -o ./mdk -g $(CORE_OBJS) $(CPPOBJS) -lmdk_app -lmdk_dvrr -ldl -lrt -lpthread
	cp ./mdk /mnt/hgfs/pub/
#	cp ./mdk_core /mnt/hgfs/pub/mc
	
clean:
	-rm $(CORE_OBJS)

